<template>
  <div class="">
    <el-button @click="setMutation">Mutation</el-button>
    <el-button @click="setAction">Action</el-button>
  </div>
</template>

<script setup lang="ts">
// import { fetchRoom } from '@/api/index'
import { useStore } from '@/store'

const store = useStore()
const setMutation = () => {
  store.commit('setCount', 2)
  console.log(store.state.count)
}
const setAction = () => {
  store.dispatch('fetchCount', 10)
  console.log(store.state.count)
}
</script>

<style lang="scss" scoped></style>
